
package com.yunfei.web;

import com.yunfei.bo.TblobstorageBo;
import com.yunfei.entity.TCustBuyinEntity;
import com.yunfei.mapper.test1.TblobtSorageMapper;
import com.yunfei.mapper.test2.TCustBuyinMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 份额确认生成书
 * 先生成确认书，如果成功，返回文件大小
 * @Author: zhengyunfei
 * @Date: 2018/6/15
 * @time:11:26
 */
@RestController
@RequestMapping("/api/crm/tblobstorage")
public class TCustBuyinApiController {
    @Autowired
    private TblobtSorageMapper tblobtSorageMapper;
    @Autowired
    private TCustBuyinMapper tCustBuyinMapper;

    @PostMapping("/get")
    @ResponseBody
    public Object post(){
        Map<String,Object> resultModel=new HashMap();
        //查询附件需要
        int xh=tblobtSorageMapper.getTblobStorageSeq();
        try{
            resultModel.put("data",xh);

        }catch (Exception e){

        }
        return resultModel;
    }
    /**
    * @Description: 获取信息
    * @Author: zhengyunfei
    * @Date: 2018/12/13
    * @time:14:18
    */
    @GetMapping("/get")
    @ResponseBody
    public Object get(){
        Map<String,Object> resultModel=new HashMap();
        //查询附件需要
        int xh=tblobtSorageMapper.getTblobStorageSeq();
        try{
            resultModel.put("data",xh);

        }catch (Exception e){

        }
        return resultModel;
    }
    @GetMapping("/get2")
    @ResponseBody
    public Object get2(){
        Map<String,Object> resultModel=new HashMap();
        //查询附件需要
        List<TCustBuyinEntity> xh=tCustBuyinMapper.findAllList(null);
        try{
            resultModel.put("data",xh);

        }catch (Exception e){

        }
        return resultModel;
    }
    /**
    * @Description: 写入日志信息
    * @Author: zhengyunfei
    * @Date: 2018/12/13
    * @time:14:18
    */
    @PostMapping("/add")
    @ResponseBody
    public Object insert(TblobstorageBo tblobstorageBo){
        Map<String,Object> resultModel=new HashMap();
        //查询附件需要
        try{
            //tblobtSorageMapper.add(tblobstorageBo);


        }catch (Exception e){


        }
        return resultModel;
    }
}
